import { UserDao } from './../dao/userDao'
import { IamInfo } from '../controller/iamInfo'
import { User } from '../model/user'
export class UserService {
  private readonly userDao = new UserDao()
  public queryLoginUser(params: any): Promise<User> {
    params.account = IamInfo.id
    return this.userDao.queryLoginUser(params)
  }
  public updatePassword(params: any): Promise<User> {
    params.creator = IamInfo.id
    params.updater = IamInfo.id
    params.account = IamInfo.id
    return this.userDao.updatePassword(params)
  }
  public updateUser(params: any): Promise<any> {
    params.creator = IamInfo.id
    params.updater = IamInfo.id
    return this.userDao.updateUser(params)
  }
}
